package com.tdd.api.server.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NonNull;
import lombok.experimental.Accessors;

import java.util.Collection;


@Accessors(chain = true)
@NonNull
@Data
@ApiModel(description = "分页通用返回参数")
public class PageModule<T> {
    /**
     * 当前页
     */
    @ApiModelProperty(value = "当前页",dataType = "Integer",example = "1")
    public Integer pageNum;
    /**
     * 每页显示的总条数
     */
    @ApiModelProperty(value = "每页记录数",dataType = "Integer",example = "10")
    public Integer pageSize;
    /**
     * 总条数
     */
    @ApiModelProperty(value = "总记录数",dataType = "Integer",example = "30")
    public Integer total;
    /**
     * 总页数
     */
    @ApiModelProperty(value = "总页数",dataType = "Integer",example = "3")
    public Integer pages;


    @ApiModelProperty(value = "数据列表")
    public Collection<T> records;

}
